﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Configuration;

namespace CentralMonitoring
{
    public partial class Verify : Form
    {
        private string pwd = "";
        public Verify()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Trim() == pwd)
            {
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
            else
            {
                MessageBox.Show("密码错误！", "提示");
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void Verify_Load(object sender, EventArgs e)
        {
            pwd = ConfigurationManager.AppSettings["pwd"].ToString();
        }

        private void label3_Click(object sender, EventArgs e)
        {
            UserPwdEdit dlg = new UserPwdEdit();
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                pwd = ConfigurationManager.AppSettings["pwd"].ToString();
            }
        }
    }
}
